Creating an Action Template |
|
An action template represents the draft of an action which can be reused. For example, if you have used aset discountaction in a rule, and want to use the same action in another rule, you need not build that action from scratch. Instead, you can pick an action template, fine-tune it to your specifications, and use it to build the rule.
You can either design actions that can be used directly by the users or accept parameters from users to form the complete action. The parameters preceded by a colon(:) are taken as variables and the users using this template in a decision table can specify the values to these parameters.
![](attachments/232689848/234226722.png)
Action Type |
Action |
---|---|
Trigger Business Process |
Click
|
Invoke Web service |
Click
|
Send Notification |
Provide the necessary details in the Define action here pane. Refer to steps 3 to 6 of Using Send Notification for information on the fields of Send Notification action. Click |
Assign |
Select the required <schema fragment> from the Workspace Documents (Explorer) and drag it to the Input Schema in the editor. Alternatively, click |
Abort |
Type the message, that is to be displayed to the user when the transaction is aborted, in XML format. |
For more information on the actions, refer to the specific Rule Actions.
- Select the required parameter in the message and type the parameter name preceded by a colon(:) in the expression. For example, use prefix: for the Order parameter as shown in the sample code. While using this action template in a decision table, users can specify the values to these parameters.
<GetOrderId xmlns="http://schemas.cordys.com/orders">:Order</GetOrderId>
- Press tab or click anywhere outside the cell. The parameter details are displayed in the Parameter Details table.
- Type the appropriate label for the parameter in the Description text box. This label is displayed to the user when designing the rule.
- Select the type of parameters to be used, from the Parameter Type list box. The parameters are displayed in the Parameters pane.
![](attachments/232689848/234226834.png)
![](attachments/232689848/234226683.png)
An action template is created. You can drag these action templates to the Action section of the decision table. When you use an action template for defining the action in a decision table, you can select values from the set of parameters that are set in the action template.